<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入 layui 样式 -->
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
    <!-- 引入自己的css样式 -->
    <link rel="stylesheet" href="/assets/article/art-list.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">文章列表</div>
        <div class="layui-card-body">
            <!-- 筛选框1 -->
            <form id="form-filter" class="layui-form layui-form-pane" action="">
                <div class="layui-inline" pane>
                    <label class="layui-form-label">分类</label>
                    <div class="layui-input-inline">
                        <select name="cate_id" lay-verify="">
                            <option value="">请选择文章分类</option>
                            <!-- <option value="010">北京</option>
                            <option value="021">上海</option>
                            <option value="0571">杭州</option> -->
                          </select>
                    </div>
                </div>
                <!-- 筛选框2 -->
                <div class="layui-inline" pane>
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-inline">
                        <select name="state" lay-verify="">
                            <option value="">请选择已发布状态</option>
                            <option value="已发布">已发布</option>
                            <option value="草稿">草稿</option>
                          </select>
                    </div>
                </div>
                <!-- 提交按钮 -->
                <div class="layui-inline">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                        <button data-id="{{$value.Id}}" type="button" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>文章标题</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <!-- 分页器 -->
            <div id="pagination"></div>
        </div>
    </div>
    <!-- 定义模板 -->
    <script type="text/html" id="art-list-tpl">
        {{each data}}
        <tr>
            <td>{{$value.title}}</td>
            <td>{{$value.cate_name}}</td>
            <td>{{$value.pub_date | dateFormat}}</td>
            <td>{{$value.state}}</td>
            <td>
                <button type="button" class="layui-btn  layui-btn-sm">编辑</button>
                <button type="button" class="del-btn layui-btn  layui-btn-danger  layui-btn-sm">删除</button>
            </td>
        </tr>
        {{/each}}
    </script>
    <script type="text/html" id="cart-sart-tpl">
        {{each data}}
        <option value="{{$value.Id}}">{{$value.name}}</option>
        {{/each}}
    </script>
    <!-- 引入moment模板 -->
    <script src="/assets/lib/moment.js"></script>
    <!-- 引入模板 -->
    <script src="/assets/lib/template-web.js"></script>
    <!-- 引入layui.all.js -->
    <script src="/assets/lib/layui/layui.all.js"></script>
    <!-- 引入jquery -->
    <script src="/assets/lib/jquery.js"></script>
    <!-- 引入 baseAPI -->
    <script src="/assets/js/baseApi.js"></script>
    <!-- 引入自己的js -->
    <script src="/assets/article/art-list.js"></script>
</body>

</html>